package com.xindaoapp.happypet.db;

import java.util.Map;

import android.database.sqlite.SQLiteDatabase;

import com.xindaoapp.happypet.bean.PostInfo3;
import com.xindaoapp.happypet.db.model.PostDao;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;




public class DaoSession extends AbstractDaoSession {
    private final PostDao tagsDao;

    private final DaoConfig postConfig;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type,
            Map<Class<? extends AbstractDao<?, ?>>, DaoConfig> daoConfigMap) {
        super(db);

        postConfig = daoConfigMap.get(PostDao.class).clone();
        postConfig.initIdentityScope(type);

        tagsDao = new PostDao(postConfig, this);

        registerDao(PostInfo3.class, tagsDao);
    }

    public PostDao getTagsDao() {
        return tagsDao;
    }

}
